<%@page import="entities.User"%>
<%@page import="java.util.TreeMap"%>
<%
TreeMap check = (TreeMap) request.getAttribute("check");
String name = (String) request.getParameter("name");
User user = (User) request.getAttribute("user");
String success = (String) request.getAttribute("success");
String form = (String) request.getAttribute("form");
%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp" />

				<% if (success != null) { %>
				<div class="success"><%=success %></div>
				<% } %>
				
                <div id="leftSideContent">
                	<section class="block">
                    	<div class="blockContent">
                        	<div class="registerPage clearafter">
                            	<div class="left">
                                	<div class="left_inner">
                                        <h3 class="blockHeading"><span><%=form.equalsIgnoreCase("edit") ? "Profile" : "Register" %> Form</span></h3>
                                        <form method="post" action="">
                                            <label>
                                                <span>Email</span>
                                                
                                                <input value="<%=user.getUsername()%>" readonly="readonly">
                                            </label>
                                            <label>
                                                <span>Display Name</span>
                                                <% if (check.get("name") != null) { %>
													<div class="error"><%=check.get("name")%></div>
												<% } %>
                                                <input type="text" name="name" value="<%=user.getName()%>" />
                                            </label>
                                            <label>
                                                <span>Gender</span>
                                                <select name="gender">
                                                	<option value="0">Male</option>
                                                	<option value="1">FeMale</option>
                                                </select>
                                            </label>
                                            <div class="captcha">
                                                <% if (check.get("captcha") != null) { %>
													<div class="error"><%=check.get("captcha")%></div>
												<% } %>
												<script>
										        	var RecaptchaOptions = { theme : 'red' };
										  		</script>
												<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6LeA0c4SAAAAAMsdjrB49GPol6XImTdJM2U2AHrF"></script>
                                            </div>
                                            <div class="content-center">
                                            	<button type="submit">Register</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                                <div class="right">
                                	<h3 class="blockHeading">
										<span>Note</span>
									</h3>
									<div class="content-right">
										Website allow only users to sign in to your application using a Google Account. If this is your first time to the site, we will ask you to update profile. 
									</div>
                                </div>
                            </div>                            
                        </div>
                        <div class="blockShadow"></div>
                    </section>                	
                </div>
                
                <!-- right content -->
                <jsp:include page="/elements/right.jsp" />
                <!-- end right content -->
                
<jsp:include page="/layouts/footer.jsp" />